<template>
    <div>
        <van-nav-bar title="京东注册" left-text="返回" left-arrow @click-left="$router.push('/code')" />
        <van-cell-group inset>

            <van-field v-model="value" label="密码" placeholder="请输入密码" />
        </van-cell-group>
        <p>
            <van-button type="primary" block @click="lastFun">完成</van-button>
            <!-- disabled -->
        </p>
    </div>
</template>

<script lang='ts' setup>
import { showDialog } from 'vant';
import { ref } from 'vue';
import { useRouter } from 'vue-router';
const router = useRouter();
const value = ref<string>('');
const lastFun = () => {
    showDialog({
        message: '注册成功',
    }).then(() => {
        router.push('/login')
    });
}
</script>
 
<style lang='scss' scoped>
.van-cell-group {
    margin-top: 60px;
}

p {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;

    .van-button {
        margin-top: 60px;
        width: 90%;
    }
}
</style>